<th:block th:fragment="styles">
  <style th:inline="css">
    .sidebar {
      width: /*[(${theme.config.basic?.sidebar_width})]*/;
    }

    .page-top {
      width: calc(100% - [(${theme.config.basic?.sidebar_width})]);
    }

    .content {
      width: calc(100% - [(${theme.config.basic?.sidebar_width})]);
    }

  </style>

  <th:block th:if="not ${#strings.isEmpty(theme.config.basic.sidebar_background)}">
    <style th:inline="css">
      .sidebar {
        background: url("[[${theme.config.basic.sidebar_background}]]") no-repeat center center fixed;
      }
    </style>
  </th:block>
</th:block>
